package com.me.backend.api.rest.resources;

import com.google.common.collect.Lists;
import com.me.backend.api.domain.Lodge;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Api(value = "Lodge resource")
@RestController
public class LodgeResource {
    @CrossOrigin
    @RequestMapping(value = "/lodge", method = RequestMethod.POST, produces = "text/plain")
    @ApiOperation(value = "lodge claim")
    @ApiResponses(value = {
            @ApiResponse(code = 200, message = "Success", response = String.class)
    })
    public String lodge(@RequestBody Lodge lodge) {
        return "food".equalsIgnoreCase(lodge.getLossDetail().getLossType()) ? "CLAIM-123456" : "";
    }
}
